package it.multisystem.geometry;

public class RegularTriangle extends Polygon {
	private double length;
	public RegularTriangle(String name, double length) {
		super(name);
		this.length = length;
	}

	@Override
	public double area() {
		return (this.length * this.length * Math.sqrt(3)) / 8;
	}

	@Override
	public double perimeter() {
		return this.length * 3;
	}
}
